package com.wkkk.ysuBBS.service;

import com.wkkk.ysuBBS.bean.LoginTicket;
import com.wkkk.ysuBBS.bean.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wkkk
 * @since 2021-07-06
 */
public interface UserService extends IService<User> {

    Map<String, Object> register(User user, String serverName, int serverPort);

    int activation(int userId, String code);

    Map<String, Object> login(String username, String password, int expiredSeconds);

    Collection<? extends GrantedAuthority> getAuthorities(int userId);

    LoginTicket findLoginTicket(String ticket);
}
